package cn.wei.sdd.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
//@ToString
public enum OrderStatusEnum {

//    状态（-1：取消订单，0：待接单，1：等待上门， 2：完成）
    Cancel_Order(-1, "已取消"),
    Wait_Order(0, "待接单"),
    Waiting_For_The_Door(1, "等待回收"),
    Finish(2, "完成"),
    overTime(3, "超时取消"),
    ;

    private Integer status;
    private String msg;

    public static String getMsgByStatus(int status) {
        OrderStatusEnum arrObj[] = OrderStatusEnum.values();
        for (OrderStatusEnum obj : arrObj) {
            if (status == obj.getStatus().intValue()) {
                return obj.getMsg();
            }
        }
        return "";
    }
}

